<?php

namespace app\speedDating\services\common;

use app\admin\controller\Sys\Config;
use app\speedDating\exception\ServiceRuntimeException;
use app\speedDating\interfaces\ServiceCodeStatus;
use app\speedDating\interfaces\ServiceMessage;
use app\speedDating\model\S_order;
use app\speedDating\model\S_spu;
use app\speedDating\model\S_store;

class OrderUtilsService
{
    /**
     * 生成订单号
     * @param $prefix
     * @return int
     */
    private static function generateOrderSn($prefix)
    {
        list($msec, $sec) = explode(' ', microtime());
        $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
        return substr($prefix, -2) . $msectime . mt_rand(1000, 9999);
    }
}